<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //申明对象函数
        var a = function(){};
        //函数声明
        function fn2 (){};
        //new函数
        var fn3 = new Function();
        console.log(a.prototype);
        console.log(fn2.prototype);
        console.log(fn3.prototype);
        fn3();
        console.log(fn3.prototype);
        console.log(Function.prototype);//函数对象

        //portotype原型的主要作用：实现贡献（继承）
        function Cat(){};
        Cat.prototype.a=123;
        Cat.prototype.b=46;
        Cat.prototype.c=function(){
            console.log('hehe');
        };
        var cat1 = new Cat();
        var cat2 = new Cat();
        var cat3 = new Cat();
        var cat4 = new Cat();
        console.log(cat1.a);
        console.log(cat2.a);
        console.log(cat3.a);
        console.log(cat4.a);
    </script>
</body>
</html>